

/* Bring in data from 1_Data_Cleaning.do */
clear all
use "data/outputs/clean_mm.dta", clear 


**------------------------------------------------------**
** Effect of rationale on support for budget power grab **
**------------------------------------------------------**

/* Create a variable recording correct recall of scenario */ 
gen correct_scenario = 0  
replace correct_scenario = 1 if exp1_scenario_answer == 2 & exp1_scenario == 1 
replace correct_scenario = 1 if exp1_scenario_answer == 4 & exp1_scenario == 2 
replace correct_scenario = 1 if exp1_scenario_answer == 1 & exp1_scenario == 3 
replace correct_scenario = . if exp1_scenario_answer == . | exp1_scenario == . 

/* Create a variable recording correct recall of party */ 
gen correct_party = 0 
replace correct_party = 1 if exp1_govparty == 1 & exp1_govparty_answer == 1
replace correct_party = 1 if exp1_govparty == 2 & exp1_govparty_answer == 2
replace correct_party = . if exp1_govparty == . | exp1_govparty_answer == .


**--------------------**
** Continuous outcome **
**--------------------**

/* full sample */
eststo exp11: reg exp1_support i.exp1_scenario, robust

/* correct recall of scenario */
eststo exp12: reg exp1_support i.exp1_scenario if correct_scenario  == 1, robust

/* correct recall of party    */
eststo exp13: reg exp1_support i.exp1_scenario if correct_party  == 1, robust

/* correct recall of scenario & party */
eststo exp14: reg exp1_support i.exp1_scenario if correct_scenario * correct_party == 1, robust


**----------------**
** Binary outcome **
**----------------**

/* binary outcomes */
gen exp1_supportB=exp1_support>2
replace exp1_supportB =. if exp1_support ==.

/* full sample */
eststo exp15: reg exp1_supportB i.exp1_scenario, robust

/* correct recall of scenario */
eststo exp16: reg exp1_supportB i.exp1_scenario if correct_scenario  == 1, robust

/* correct recall of party    */
eststo exp17: reg exp1_supportB i.exp1_scenario if correct_party  == 1, robust

/* correct recall of scenario & party */
eststo exp18: reg exp1_supportB i.exp1_scenario if correct_scenario * correct_party == 1, robust


**----------------**
** Output results **
**----------------**

/* Continuous outcome */
esttab exp11 exp12 exp13 exp14 /*
*/ using "outputs/Table3A.tex", b(3) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) /*
*/ keep (2.exp1_scenario 3.exp1_scenario _cons) /*
*/ mtitles("All Respondents" "Recall Scenario" "Recall Party" "Recall Both") /*
*/ varlabels(2.exp1_scenario "Gridlock" 3.exp1_scenario "Special interests" /*
*/ _cons "Constant (Polarization mean)")  se r2 label replace

/* Binary outcome */
esttab exp15 exp16 exp17 exp18 /*
*/ using "outputs/Table3B.tex", b(3) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) /*
*/ keep (2.exp1_scenario 3.exp1_scenario _cons) /*
*/ mtitles("All Respondents" "Recall Scenario" "Recall Party" "Recall Both") /*
*/ varlabels(2.exp1_scenario "Gridlock" 3.exp1_scenario "Special interests" /*
*/ _cons "Constant (Polarization mean)")  se r2 label replace



/* Drop stored estimates */
drop _est*


/* End */
